﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TravelPage.aspx.cs" Inherits="MyTravelPostWebsite.TravelPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>My Posting</title>
    </head>
<body>
    <form id="form1" runat="server">
    <div style="width: 642px">
        <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="Default.aspx">Home</asp:HyperLink>
        <br />
        This is the most recent blog posting. This queries for the people, blog post, 
        and comments.<br />
        <br />
        <asp:Label ID="labelSeries" runat="server" style="font-size: xx-large" 
            Text="Label"></asp:Label>
        <br />
        <br />
        <br />
        <asp:Label ID="labelBlogTitle" runat="server" style="font-size: large" 
            Text="Label"></asp:Label>
        <br />
        <asp:Label ID="labelPerson" runat="server" Text="Label"></asp:Label>
        </div>
    <asp:TextBox ID="blogEntry" runat="server" BorderStyle="Solid" Height="212px" 
        ReadOnly="True" TextMode="MultiLine" Width="647px"></asp:TextBox>
    <br />
    <br />
    Comments: <i>(The comments are a result of a projected 
        LINQ query that includes the person)</i><br />
        Select delete to remove the comment.
    <asp:GridView ID="gridComments" runat="server" CellPadding="4" 
        ForeColor="#333333" GridLines="None" AutoGenerateDeleteButton="True" 
        onrowdeleted="gridComments_RowDeleted" 
        onrowdeleting="gridComments_RowDeleting">
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <EditRowStyle BackColor="#999999" />
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
    </asp:GridView>
    <p>
        Update every other comments with a * at the end of the comments.<br />
        <asp:Button ID="buttonUpdate" runat="server" onclick="buttonUpdate_Click" 
            Text="Update" />
    </p>
    <p>
        Create a comment by select a person, entering text, and clicking the &#39;Save 
        Changes&#39; button.</p>
    <p>
        Select a person:<br />
        <asp:DropDownList ID="dropdownPersons" runat="server">
        </asp:DropDownList>
    </p>
    
    Comment Text:<br />
    <asp:TextBox ID="textComment" runat="server" Height="100px" 
        TextMode="MultiLine" Width="400px"></asp:TextBox>
    <asp:Button ID="buttonSubmitComment" runat="server" Height="28px" 
        onclick="buttonSubmitComment_Click" Text="Save Changes" Width="89px" />
    <br />
    <br />
    To show how the EntityKey can be used separately, change the owner of the blog.<br />
    <br />
    Select a person, and click &#39;Change Owner&#39;<br />
        <asp:DropDownList ID="dropdownBlogPersonChange" runat="server">
        </asp:DropDownList>
    <asp:Button ID="ChangeOwner" runat="server" Text="Change Owner" 
        onclick="ChangeOwner_Click" />
    </form>
</body>
</html>
